package org.cybzacg.convert.constants;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

public final class CollectionType {
    /**
     * 支持的集合类型集合
     */
    public static final Set<Class<?>> SUPPORTED_COLLECTION_TYPES = Set.of(
            Collection.class,
            List.class,
            Set.class,
            Map.class,
            Queue.class,
            Deque.class,
            ArrayList.class,
            LinkedList.class,
            HashSet.class,
            TreeSet.class,
            HashMap.class,
            TreeMap.class,
            LinkedHashMap.class,
            ConcurrentHashMap.class
    );

    /**
     * 集合接口到实现类的映射
     */
    public static final Map<Class<?>, Class<?>> INTERFACE_TO_IMPLEMENTATION = Map.of(
            List.class, ArrayList.class,
            Set.class, HashSet.class,
            SortedSet.class, TreeSet.class,
            NavigableSet.class, TreeSet.class,
            Queue.class, LinkedList.class,
            Deque.class, ArrayDeque.class,
            Map.class, HashMap.class,
            SortedMap.class, TreeMap.class,
            NavigableMap.class, TreeMap.class
    );
}
